﻿<UserControl x:Class="SilverlightPacmanApp.Page"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:lcl="clr-namespace:SilverlightPacman"
             xmlns:controls="clr-namespace:Microsoft.Windows.Controls;assembly=Microsoft.Windows.Controls"
    MinWidth="400" MinHeight="300">
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.Resources>
            <lcl:BooleanToVisibilityConverter x:Name="b2vc"/>
        </Grid.Resources>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="120"/>
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <!--<controls:Viewbox IsTabStop="True" Grid.Column="1" HorizontalAlignment="Stretch" 
                          VerticalAlignment="Stretch" Stretch="Uniform" IsHitTestVisible="True">-->
            <lcl:PacmanUC IsTabStop="True" Grid.Column="1"  x:Name="pacmanUC" HorizontalAlignment="Left"/>
        <!--</controls:Viewbox>-->
        <!--<Image Source="IMG_0254_800x600.jpg" Grid.Column="1"/>-->
        <lcl:StartPage x:Name="startpageUC"
                       Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" 
                       VerticalAlignment="Center"
                       Visibility="{Binding IsGameOver, Converter={StaticResource b2vc}}" IsTabStop="False"
                       IsHitTestVisible="False"/>
        <TextBlock Grid.Column="1" Text="Ready !" FontSize="36" FontFamily="CRACKMAN.TTF#CRACKMAN" Foreground="Yellow" 
                   HorizontalAlignment="Center" VerticalAlignment="Center"
                   Visibility="{Binding IsReady, Converter={StaticResource b2vc}}" Margin="10,0,0,0" IsHitTestVisible="False"/>
        <StackPanel>
            <StackPanel.Background>
                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                    <GradientStop Color="#FBFCFD" Offset="0"/>
                    <GradientStop Color="#C1D2EE" Offset="1"/>
                </LinearGradientBrush>
            </StackPanel.Background>
            <!--<lcl:GroupBox Header="Highscore" Margin="2,2,5,2" BorderBrush="#98B5E2">
                <TextBlock Text="{Binding CurrentGame.HighScore}" FontFamily="digital.ttf#digital" FontSize="18" Foreground="Blue"/>
            </lcl:GroupBox>-->
            <TextBlock Text="Your score :"/>
            <TextBlock Text="{Binding CurrentGame.Score}" FontFamily="digital.ttf#digital" FontSize="26"/>
            <TextBlock Text="Next live at :"/>
            <TextBlock Text="{Binding CurrentGame.LifeScore}" FontFamily="digital.ttf#digital" />
            <TextBlock Text="Level :"/>
            <TextBlock Text="{Binding CurrentGame.Level}" FontFamily="digital.ttf#digital"/>
            <TextBlock Text="Lives :"/>
            <TextBlock Text="{Binding CurrentGame.Lives}" FontFamily="digital.ttf#digital"/>
            <!--<lcl:GroupBox BorderBrush="#98B5E2" Header="Wall design" Visibility="Collapsed">
                <StackPanel>
                    <RadioButton Content="Standard" IsChecked="true" Checked="RadioButton_Checked" IsTabStop="False"/>
                    <RadioButton Content="Image 1"  Checked="RadioButton_Checked" IsTabStop="False"/>
                    <RadioButton Content="Image 2" Checked="RadioButton_Checked" IsTabStop="False"/>
                </StackPanel>
            </lcl:GroupBox>-->
            <TextBlock Text="Audio :"/>
            <Grid>
                <Grid.RenderTransform>
                    <ScaleTransform ScaleX="0.5" ScaleY="0.5"/>
                </Grid.RenderTransform>
                <Path x:Name="Speaker" Stroke="Black" StrokeThickness="5" Data="M 15 20 l 0 20 l 10 0 l 10,10 l 0,-40 l -10,10 Z" />
                <Path Stroke="Gray" StrokeThickness="6" Data="M 45 20 l 0 20" />
                <Path x:Name="SpeakeroFF" Stroke="Red" StrokeThickness="5" Data="M 10 15 l 30 30 M 40 15 l -30 30" 
                      Visibility="{Binding IsMuted, Converter={StaticResource b2vc}}"/>
            </Grid>
        </StackPanel>
   </Grid>
</UserControl>
